<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Title</title>
  </head>
  <body>
    <div>
      <input style="width:500px;height:50px;margin-top: 20px" id="appVersion" placeholder="请输入appVersion" />
      <div
        style="margin-top:10px;width:250px;height: 50px;text-align: center;line-height:50px;border:1px solid blue;"
        onclick="goChinaMobileminiProgram()"
        class="a-button a-button-primary"
      >
        点我去中国移动小程序示例
      </div>
    </div>
  </body>
  <script>
    function goChinaMobileminiProgram() {
      let clickTime = new Date().getTime()
      let appversion = document.getElementById('appVersion').value
      if (!appversion) {
        alert('请输入appVersion')
        return
      }
      console.log('nowTime', clickTime, appversion)
      let minipagePath = 'pages/api/request/request?appversion=' + appversion + '&clickTime=' + clickTime
      let endUrl = `https://app.10086.cn/activity/transferXcx/index.html?platform=cmcc&appId=8378329762115640&path=${encodeURIComponent(
        minipagePath
      )}`

      console.log('endUrl', endUrl)
      window.location.href = endUrl
    }
  </script>
</html>
